
<%=
def myLink (role, name, titel)
	httpLink = "http://#{request.env["HTTP_HOST"]}/?r=" + role

	"<a style=\"position: relative; top: -3px; left: -3px;\" href=\""+ httpLink + "\">" + name + "</a>" +	
	"<a  href=\"mailto:?subject=[Checklist]%20" + titel +"&body=Hier%20is%20my%20Checklist:%20"+ httpLink + "\">" +
			image_tag("email_b.png", :alt=>"Send Mail") + "</a>" +
	"<a href=\"javascript:setFavorit(document.title, '" + httpLink + "');\">" + image_tag("favorite.png", :alt=>"Set Favorit")  + "</a>"
end
%>
<%if @rolle and @items.size>0%>
	<%@add_item =  render :partial => 'new_item'%>
	<%@split =  "&nbsp;&nbsp;|&nbsp;&nbsp;"%>
		<%if @rolle == "owner"%>
		
	    <% @add_new_item = capture do %>
          <div class="links">
				<%= @add_item%>
		</div>
     <% end %>
	  <% @verweise = capture do %>
         	<div class="verweise">	
			<%=myLink (@owner.inhaber, "Owner", @owner.titel) %> <%=@split%> 
			<%=myLink (@owner.checker, "Checker", @owner.titel) %> <%=@split%> 
			<%=myLink (@owner.gast, "Gast", @owner.titel)%> 
		</div>
     <% end %>
	<%end%>
	
  <div id="itemsContainer">
  
<div id="header">
	
	<div id="titel">
		<%= render :partial=>'titel_show'%>
	</div>
</div>

<div id="content"> 
	
     <div id="items_table"> 
		<%= render :partial=>'list_item' %>
	</div>
	<%=@add_new_item%>
</div>


	
	<div id="footer">
		<%=@verweise%>
	     <%= link_to 'New Checklist', new_item_path %> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;              
	     <%= link_to 'Copy Checklist', "/items/copy?r=#{params[:r]}"  %>
    </div>
<%else%>
<%=@syntax%>

	<%= link_to 'new checklist', new_item_path %>
<%end%>



